package com.itheima.file;

import java.io.*;

public class FileDemo3 {
    public static void main(String[] args) throws IOException {
//        FileInputStream fis=new FileInputStream("D:\\itcast\\tu.jpg");

        BufferedInputStream bis=new BufferedInputStream(new FileInputStream("D:\\itcast\\tu.jpg"));
//        FileOutputStream fos=new FileOutputStream("D:\\itcast\\b\\图片1");
       BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream("D:\\itcast\\b\\图片1"));
     /*   int b=0;
        while((b=fis.read())!=-1){
            fos.write(b);
        }

        fis.close();
        fos.close();*/
        int len=0;
        while ((len=bis.read())!=-1){
            bos.write(len);

        }
        bis.close();
        bos.close();
    }
}
